package com.yuejian_06.yuejian_06.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.Toast;

import com.yuejian_06.yuejian_06.R;
import com.yuejian_06.yuejian_06.bean.UserInfoBean;

public class SetpersonalActivity extends AppCompatActivity {
    private LinearLayout user_info;
    private LinearLayout user_update;

    private Button loglout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setpersonal);
        initView();
        initEvent();
    }
    private void initView(){
        user_info = (LinearLayout) findViewById(R.id.user_info);
        user_update = (LinearLayout) findViewById(R.id.user_update);
        loglout = (Button) findViewById(R.id.loglout);
    }
    private void initEvent(){
        user_info.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SetpersonalActivity.this,UserinfoActivity.class);
                startActivityForResult(intent,1);
            }
        });
        user_update.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SetpersonalActivity.this,UpdateActivity.class);
                startActivityForResult(intent,1);
            }
        });
        loglout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(SetpersonalActivity.this,LoginActivity.class);
                Toast.makeText(SetpersonalActivity.this,"注销成功",Toast.LENGTH_SHORT).show();
                startActivityForResult(intent,1);
            }
        });
    }
}
